<%@page import="models.User"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="css/main.css"/>
<link rel="stylesheet" type="text/css" href="css/mur.css"/>
<script type="text/javascript" src="js/jquery-1.7.1.js"></script>
<script type="text/javascript" src="js/jquery.validate.js"></script>
<script type="text/javascript">
$(document).ready(function() {
	$('#leftcolumn').load('homemenu.jsp');
	$('#topcolumn').load('homeheader.jsp');
	$('#rightcolumn').load('ContentController');
	$("#searchuser").validate({
    	submitHandler: function(form) {
    		$('#rightcolumn').load('SearchController',$("#search").serialize());
    		$('#leftcolumn').load('homemenu.jsp');
    	}
    });

});
</script>
<title>home</title>
</head>
<body>
   <!-- Begin Wrapper -->
   <div id="wrapper">  
         <!-- Begin Header -->
         <div id="header">
	         <div id="contentheader">
	         	<div id="leftheader"><img SRC="./etc/img/logo.png" WIDTH=100 HEIGHT=40 BORDER=0></img></div>
	         	<div id="rightheader">
	         	<ul>
		        <li><form style="display:inline;" action="SearchController" method="post" id=searchuser>
		  		  	<input class="searchbox" type="text" placeholder="Username o Nombre" name="search" id="search"/>
		  		 </form></li>
	        	<li>Hola <%= session.getAttribute("user") %> </li>
	        	<li><a class="header" href="HomeController?viewUser=<%=session.getAttribute("user")%>"> Home </a></li>
	        	<li><a class="header" href="LogoutController?logout=<%= session.getAttribute("user") %>"> Logout </a></li>
	        	</ul>
	        	</div>
		 	</div>
		 </div>
		 <!-- End Header -->	 
         <!-- Begin Faux Columns -->
         
		 <div id="faux">
		 		<div id="topcolumn" name ="topcolumn">
		 		</div>
		 		<div id="missatge"><% if (request.getAttribute("message") != null) out.print(request.getAttribute("message")); %></div>
		 		<div class="clear"></div>
		       <!-- Begin Left Column -->
		       <div id="leftcolumn" name="leftcolumn">
		       </div>
		       <div id="rightcolumn">
			   <div class="clear"></div>
		       </div>
		       <!-- End Right Column -->
			   <div class="clear"></div>
			   
         </div>	   
         <!-- End Faux Columns --> 

         <!-- Begin Footer -->
         <div id="footer">
         
         </div>
		 <!-- End Footer -->
   </div>
   <!-- End Wrapper -->
</body>
</html>